package com.example.bootdemo.common.enums;

public enum ResultCodeEnum {

    /*全局返回码*/
    SUCCESS(200,"操作成功！"),
    FAIL(-1,"抱歉，系统繁忙，请稍后重试！"),
    NOTFOUND404(404,"资源(接口)不存在"),
    PARAMETER_ERROR(90001,"参数错误"),
    BUSINESS_ERROR(90002,"业务异常"),
    SQL_EXCEPTION(90003,"SQL执行异常"),

    /*用户相关 1xxxx */
    UNAUTHENTICATED(403,"您还未登录"),
    UNAUTHORISE(10002,"您的权限不足"),
    ACCOUNTORPASSWORDERROR(10003,"用户名或密码错误"),
    LOGINSUCCESS(10004,"登录成功"),
    LOGINERROR(10005,"登录失败"),
    LOGOUTSUCCESS(10006,"登出成功"),
    TOKENEXPIRE(10007,"token过期"),
    TOKENERROR(10008,"token不合法"),

    BAIDU_SHARE_URL_BLANK(30013,"分享链接不能为空！！！"),
    BAIDU_SHARE_PWD_BLANK(30013,"分享密码不能为空！！！"),
    ILLEGAL_REQUEST(30013,"非法请求，请勿滥调.此次请求已记录！！！"),
    BAIDU_COOKIE_ERROR(30011,"百度cookie获取失败"),
    BAIDU_SHARE_CONFIG_ERROR(30012,"获取分享页面失败"),
    SHARE_PWD_ERROR(30010,"分享链接密码错误");
    //---用户操作返回码  2xxxx----


    //---企业操作返回码  3xxxx----
    //---权限操作返回码----
    //---其他操作返回码----


    //操作代码
    int code;
    //提示信息
    String message;

    ResultCodeEnum(int code, String message){
        this.code = code;
        this.message = message;
    }
    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}